package cn.wolfcode.trip.base.query;

import com.alibaba.druid.util.StringUtils;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class QueryObject {
    private int currentPage = 1;
    private int pageSize = 5;
    public int getStartIndex(){
        return pageSize * (currentPage - 1);
    }

    //关键字查询
    private String keyword;
    public String getKeyword(){
        return StringUtils.isEmpty(keyword)? null : keyword;
    }
}
